<?php
session_start();
   if(!isset($_SESSION["user1"]))
    header("location:index.php");
?>	
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Merchandise :: Hambaa.com</title>
<link rel="stylesheet" type="text/css" href="styles/Graphitti_style.css"/>
</head>

<body>
<div id="header">
<table border="0" align="center" width="90%" height="100"  >
<tr>
<td width="10%"><img src="images/logopng.png" width="103" height="99" /></td>
<td align="left" valign="top">
<img src="images/hambaalogo.png" width="257" height="76" />
</td>
<td valign="bottom" align="right">
	<table width="195" height="50" background="images/userback.png">
    <tr><td align="center" nowrap="nowrap">Hi <?php echo "  ".$_SESSION["user1"]."!"; ?></td></tr>
    </table>
</td>
</tr>
</table>
</div>





<table id="containertable" cellpadding="0" cellspacing="0" border="0" width="890" align="center" >
<tr>
<td>
	<div id="menulinks">
   
 <a href="good_things1.php">Home</a>
    <a href="home.php">Live Chat</a>
	<a href="diary.php">My Diary</a>
	<a href="graffiti.php">Graffiti</a>
    
    </div>

</td>
</tr>
</table>






<table border="0" width="900" height="70%" align="center" cellpadding="5">
<tr>


<td  align="center" valign="top">
<img src='images/happys.gif' width="240" height="223">
  <br><br> 
<?php
$host="localhost"; // Host name 
$username="hambaaco_fresh"; // Mysql username 
$password="root123"; // Mysql password 
$db_name="hambaaco_fresh"; // Database name 
$tbl_name="merchandise_caption"; // Table name 

// Connect to server and select databse.
mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
mysql_select_db("$db_name")or die("cannot select DB");

$mssg=$_POST['mssg'];
$mssg = stripslashes($mssg);
$mssg = mysql_real_escape_string($mssg);

$username=$_SESSION["user1"];

$sql="INSERT INTO ".$tbl_name."(username,mssg,time,date) VALUES('".$username."','".$mssg."',curtime(),curdate())";

$result=mysql_query($sql);
if($result==1)
  echo "<h1>Thank you  ".$_SESSION["user1"]."!</h1>
  <h4>for submitting your caption<br>the Merchandise section will be opened shortly</h4>
  
  ";
else
 echo "Not Succesful";
?>
<br>
	<table border="0" width="317" align="center">
	<tr><td width="152" align="center">

	<h3>Go back to home</h3>
	 <h2><a href="home.php">Click here</a>	</h2>
	</td>
    <td width="47"></td>
    <td width="104" align="center">
	 <h3>Go to Diary</h3>
	 <h2><a href="diary.php">Click here</a></h2>
	</td></tr>
	</table>
</td>


<td width="28%"  align="center" valign="top">

	<table border="0" cellspacing="2" background="images/tableback3.png">
	<tr><td> <h5>&nbsp; Advertisement</h5> </td></tr>
    
    <tr><td bgcolor="#669999"> <h6>&nbsp; Create your own design!</h6> </td></tr>
    
	<tr><td align="center"><iframe width="255" height="255" src="Untitled-1.html" frameborder="0" scrolling="no"  />
</iframe></td></tr>

	<tr align="center" ><td align="center"> 
    <h4>We'd like to hear from you</h4>
    <h2><a href="suggest.php">Make your Suggestion</a></h2>
    </td></tr>
    
    
    <tr align="center" bgcolor="#FF6666"><td align="center"> 
    <h6>Spare a moment to make hambaa.com better</h6>
    </td></tr>
    </table>



</td>
</tr>
</table>



</tr>
</table>








<br><br><br><br>
<div id="footer" > 

<table border="0" width="90%" height=50 align="center">
<tr>
<td width="30%"><a href="about_us.php">About Us</a></td>
<td width="30%"><a href="good_things1.php"> &nbsp;Home&nbsp; </a></td>
<td width="30%"><a href="contact_us.php">Contact Us</a></td>
</tr>
<tr align="center"><td colspan="3">
&copy;2011 All Rights Reserved by www.hambaa.com
</td></tr>
</table>

</div>



</body>
</html>
